package com.sunshine.feign;

import com.sunshine.feign.bean.Person;
import feign.Feign;
import feign.gson.GsonDecoder;

/**
 * @author WeiHong
 * @date 2018/11/15
 */
public class PersonMain {

    public static void main(String[] args) {
        IPersonClient personService = Feign.builder()
                .decoder(new GsonDecoder())
                .target(IPersonClient.class, "http://localhost:8081/");
        Person person = personService.findById(2);
        System.out.println("person.toString() = " + person.toString());
    }
}
